import request from '@/utils/request'

/**
 * 获取用户列表数据
 */
export const getUserManageList = data => {
  return request({
    url: '/sys/user/list',
    params: data
  })
}

export const addUser = data => {
  return request({
    url: '/sys/user/save',
    method: 'POST',
    data
  })
}

export const updateUser = data => {
  return request({
    url: '/sys/user/update',
    method: 'POST',
    data
  })
}

export const checkUser = data => {
  return request({
    url: '/sys/user/acls',
    method: 'POST',
    data
  })
}

export const listUser = () => {
  return request({
    url: '/sys/user/listUser',
    method: 'POST'
  })
}

export const searchUser = (data) => {
  return request({
    url: '/sys/user/search',
    method: 'POST',
    params: data
  })
}

export const getOperationStaff = () => {
  return request({
    url: '/sys/user/getOperationStaff'
  })
}

export const sendCode = (data) => {
  return request({
    url: '/sys/user/sendCode',
    method: 'POST',
    params: data
  })
}
